lotrminecraftmodfandomcom-20200222-history
Help/Wiki Code
Do you want to make fancy, complicated edits on the Lord of the Rings Mod wiki? Perhaps you want to simply make your signature look that much cooler. Or maybe your goal is to make a brand new template. On this page, you'll learn everything you'll need to do those things, and much more. Before undertaking any of this, it's required to switch your editing mode from Visual Mode into Source Mode. If you find the amount of content on this page overwhelming, try learning this page section by section. Learn the first few types of coding first, practice using them a bit, and then more on to more complex code. A great place to practice wiki coding is your user page. For all special formatting, please follow this advice: Use it sparingly! Normally the wiki "knows", how to format things. That way, all pages look quite uniform, which is good for quick orientation of the reader. Using a lot of special formatting mostly makes pages ugly and illegible. Basic Coding Bold, Italics, and Underline The most basic thing you can do with wiki code is to make your text bold, show it in italics, or underline it. Bold Text Type your text in three apostrophes to make it bold. Bold Text produces Bold Text. Italic Text Type your text in two apostrophes, and it'll be in italics. Italic Text produces Italic Text. Underline Use the and tags to underline your text. Underlined Text produces Underlined Text. Links 'Internal links' To make a basic internal link, type the text you want to link in two square brackets. If the name of the article you want to link to is different from the text you've written, separate them using a vertical | line. The actual page name goes in front, the text you want displayed goes next. The Kingdom of Rohan produces The Kingdom of Rohan. If you want to link to a Category page, you can do it in a similar fashion, but in this case, you'll need to add a colon (:) before the "category" prefix. The Gondor Faction produces The Gondor Faction. The same holds for links to images (instead of showing the image itself): No image shown here. produces No image shown here. To add articles to a category, you can type the following at the bottom of a page: Category:Mordor adds the page to the Mordor category. 'External links' For external links, you use only one set of square brackets, instead of two, and the text displayed is seperated from the URL by a space instead of a vertical line. Including "http://" is crucial for the external link to work. Middle-Earth Interactive Map produces Middle-Earth Interactive Map If you want to link to another wikia wiki or Wikipedia, you can use a simpler approach. To link to Wikipedia, add wikipedia: in front of the article you want to link to. Lord of the Rings produces Lord of the Rings. To link to another wiki, use the w:c:URL: prefix, followed by the common URL of the wiki you want to link to (in the case of this wiki, it's "lotrminecraftmod"). Elves produces Elves. Pictures To add pictures, the same basic syntax is used as for internal links, but there are some major differences: *The prefix is File: *There are many more tags. *The picture can be made to link to another page, or to its own information page *Keywords are more important. To simply add a picture to a page without any size changes, do the following: produces . However, the result of this operation is often unsatisfactory; the picture may be too large, too small, or in the wrong place. To make your picture look better, add some tags after the suffix. Commonly used tags include: *thumb -- allows you to add a caption below the picture *right/center/left -- puts the picture in one of these three positions *none -- aligns the picture the same way as the paragraph (normally left) and prevents if from floating *Random Text -- adds a caption below the picture, if it's a thumbnail *50px -- changes the size of the picture, to, in this case, 50px. Changing the number will make the picture a different size. *link=Article|Text -- allows you to link the picture to another article when somebody clicks on the picture (except for the small "i"-button in the lower right corner, which shows the info page of the picture). To summarize all this, here's an example: ]] produces ]] When you are fed up with wikia messing up your picture position, you can use the tag or use the none tag (see above). Headings There are several kinds of headings that are standard on this wiki. Put text in two or more equals signs to make it into heading text. Note that the more equal signs you put around your text, the smaller it'll become. You can also bold or italicize smaller headings to make them more pronounced. For example, the code that defines the "Basic Coding" heading at the top of this page is: Basic Coding and the code that defines the "Headings" heading (the one just above this section) is: Headings Templates For information on how to make templates see here. On this wiki, most templates fall into one of two categories; infobox template, or navbox template. Adding Navboxes Adding a navbox is usually as simply as putting two curly backets around the name of the template, as in . For example: produces Navboxes are useful for finding pages that are connected in some way without having to find them all individually. Adding Infoboxes Adding infoboxes can be slightly more complicated than adding navboxes, mainly because there are many parameters that can be changed. For example, the "Infobox NPC" template (as seen in the top right corner of the Rohirrim Warrior article) looks as follows when it's added to the page in source mode: To modify the parameters of any of the lines in the infobox, type the text you want to display behind the equal sign, i.e. |spawn = Rohan displays as "Rohan" in the finished product. You'll find all usable infoboxes here. Tables To create a basic table, use the following code: The above code results in this: Bullets and numbers If you want to make a bulleted list, put an asterix (*) in front of each item. For example, *Firstly... *Secondly... *Thirdly... would give: *Firstly... *Secondly... *Thirdly... If you want to make a numbered list, put a hash (#) in front of each item. For example, #Firstly... #Secondly... #Thirdly... would give: #Firstly... #Secondly... #Thirdly... Inserting a signature To insert a signature, use ' ~~~ '. This will insert your own signature like this: Gandalf the Turquoise, Lord of the Stiffbeards (Give me a tinkle) :if you want help on making your own signature see here. To insert a signature with a date stamp, use ' ~~~~ ' to give this: Gandalf the Turquoise, Lord of the Stiffbeards (Give me a tinkle) 13:20, May 28, 2015 (UTC) To insert a datestamp only, use ' ~~~~~ ' to give this: 13:20, May 28, 2015 (UTC) Subscripts and superscripts The and , and the and tags make subscripts and superscripts, respectively: Normal Text, subscript and superscript produces Normal Text, subscript and superscript. Other Strikethrough Use the and to put a strikethrough through text. Strikethrough makes Strikethrough. Horizontal lines ---- gives a horizontal line like this: ---- Indents Colons (:) at the start of a line create an indent, the more colons used, the larger the indent. For example, this: : Example indent ::: Third level example indent would give this: : Example indent ::: Third level example indent Preformatted text Use a space at the start of the line to leave the text in a pre-formatted form., meaning that it is left to look like it does in the Source Editor. For example, this: Example text would give this: Example text The and Tags If you want to display wiki coding as text, ignoring any wikicode there may be, use the and the tags as such: This is not italic text would give: This is not italic text If you want to display text in a coded view, use the and tags. The tag The tag is a basic tag that's commonly used in templates. It normally just produces a linebreak, as follows: This page describes all about wiki coding. produces: This page describes all about wiki coding. The more important purpose of it, is preventing images from "floating". The following code: produces There are also the and commands. These clear the right or left column of the page. You can use , for example, if you have a infobox on the right (like most wiki pages do) and you want to place the text on the left below the picture, but besides the infobox (if there's enough space). If you use it would place the text also below the (probably quite large) infobox, wasting a lot of space. Advanced Coding This section assumes that you have basic knowledge of the above skills. The tag If you wish to change the colour of font, or many of its other attributes, use the and tags. By default, these tags do nothing, but when combined with some other arguments, they can do some interesting things. For example, typing blue text results in blue text. In addition to the basic colours defined by words, you can use hexadecimal colour codes to change the colour of text. You can find all kinds of colours here: HTML Colour Codes. But there's more to the span tag than just changing the colour of text. With this tag, you can change the font face, the size of text, and what happens when you click on it. For example: This is some fancy text produces This is some fancy text. The span tag can also be used to change the colour of the background behind text, and to put a border around text: Bordered text on a golden background produces Bordered text on a golden background There are also several other things that the span tag can do; read more about it on htmlgoodies.com. Span tag attributes *background-color: changes the colour of the background behind the text. *border: adds a coloured border around the text. The dimensions are given in pixels, and the colour is in hexadecimal triplets or names. *color: changes the colour of font using hexadecimal colour codes, or colour names. *font-family: changes the font face. Whether or not the chosen font will work on a given computer depends on whether or not the computer has this font loaded. If the font specified can't be rendered on a computer, it will be displayed in Times New Roman instead. *font-size: changes the size of the font. *font-weight: changes the weight of font from either normal, to bold, to a value between 0 and 1000. *margin-right, top, bottom: changes the size of the margins around the text, in pixels. *text-align: center, right; aligns the text with the chosen margin of the page. The tag The tag a variant of the normal tag. Currently, the only known use of this tag on the wiki is the following: *span class="insertusername">XXXX: Replaces the text between the tags (in this case, XXXX) with the viewer's username. This tag is frequently used on profile pages, although it can be seen on the main page. Therefore, typing this: Person is reading this page produces Person is reading this page. NOTE: This tag will only work on browsers with JavaScript enabled. The tag This tag is used to add a fancy divider to pages, and is most often used when making templates. It's similar to the tag in that it doesn't do anything unless you add more attributes to it. For example: A fancy divider results in A fancy divider Most of the attributes that work with the tag will work with the tag, with the exception of the following new attribute: *width:percentage changes the width of the divider to the chosen percentage of the page width. If you know CSS coding, you will be able to use most of those attributes with both the and tags. The